import {request} from "@/utils/request";

class DeviceApi {
  getDeviceList(params) {
    return request.get('/device/deviceList', params)
  }

  getDeviceDetail(params) {
    return request.get("/device/deviceInfo", params);
  }

  updateDeviceInfo(params) {
    return request.get("/device/updateDevice", params);
  }

  //获取课本教程列表----------------
  textbookListQuest({grade, semester, subject}) {
    const data = {grade, semester, subject};
    return request({
      url: "/lf/system/textbook/textbookListQuest",
      method: "post",
      data,
    });
  }

  //获取课本教材-章节列表----------------
  async catalogList(textbookId) {
    const data = {textbookId};
    return request({
      url: "/lf/system/catalog/catalogList",
      method: "post",
      data,
    });
  }
}

export const deviceApi = new DeviceApi()
